/*
 ***************************************************************************
 * MediaTeK Inc.
 * 4F, No. 2 Technology	5th	Rd.
 * Science-based Industrial	Park
 * Hsin-chu, Taiwan, R.O.C.
 *
 * (c) Copyright 2002-2012, MTK.
 *
 * All rights reserved.	MediaTeK's source	code is	an unpublished work	and	the
 * use of a	copyright notice does not imply	otherwise. This	source code
 * contains	confidential trade secret material of MediaTeK Tech. Any attemp
 * or participation	in deciphering,	decoding, reverse engineering or in	any
 * way altering	the	source code	is stricitly prohibited, unless	the	prior
 * written consent of MediaTeK, Inc. is obtained.
 ***************************************************************************

	Module Name:
	omci_me_private_nodetable.c

	Abstract:

	Revision History:
	Who			When			What
	--------	----------		----------------------------------------------
	Name		Date			Modification logs
	mingang.tan	2018/8/16	Create
*/

#include <stdio.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <stdlib.h>
#include "omci.h"
#include "omci_me.h"
#include "omci_adpt_common.h"
#include "omci_general_func.h"
#include "omci_me_private.h"

typedef struct vendorMeInitTableBuff_s
{
    union{
		omci_ctc_loop_detect_t ctcLoopDetection;
        omci_ctc_onu_cap_t ctcOnuCap;
        omci_ctc_loid_auth_t ctcLoidAuth;
        omci_cuc_onu_cap_t cucOnuCap;
		omci_cuc_onu_trans_info_t cucOnuTransInfo;
        omci_alcatel_ont_optical_status_t ontOpticalStatus;
        omci_alcatel_ont_generic_v2_t ontGenericV2;
        omci_alcatel_vlan_tag_down_supply1_t vlanTagDown;
        omci_alcatel_vlan_tag_up_policy_t vlanTagUp;
        omci_alcatel_uni_supply_1v2_ptr uniSupply1v2;
		omci_reserved_me_247_t me247;
        omci_reserved_me_347_t me347;
        omci_reserved_me_350_t me350;
        omci_reserved_me_352_t me352;
#ifdef TCSUPPORT_PON_ROSTELECOM 
		omci_huawei_cfg_upload_t huaweiCfgUpload;
#else
        omci_reserved_me_353_t me353;
#endif
        omci_reserved_me_367_t me367;
        omci_reserved_me_373_t me373;
        omci_reserved_me_370_t me370;
        omci_reserved_me_65408_t me65408;
        omci_reserved_me_65414_t me65414;
        omci_reserved_me_65415_t me65415;
        omci_reserved_me_65425_t me65425;
		omci_reserved_me_65425_t me65427;
        omci_traffic_descriptor_t trafficDes;
		omci_eltex_onuG_t eltexOnuG;
    };
}vendorMeInitTableBuff_t, *vendorMeInitTableBuff_ptr;

/*******************************************************************************************************************************
			9.5.6 Ethernet performance monitoring history data 4(ME 255)
	
********************************************************************************************************************************/
omciAttriDescript_t omciAttriDescriptListEthernetPMHistoryData4[]={
{0, "meId", 					        2,	ATTR_ACCESS_R_SET_CREATE,		ATTR_FORMAT_UNSIGNED_INT,	0x01,	0xFF,	0,	NULL,   NO_AVC, &generalGetFunc},
{1, "interval end time",				1,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,   NO_AVC, &generalGetFunc},
{2, "threshold data 1/2 id",			2,	ATTR_ACCESS_R_W_SET_CREATE,     ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,   NO_AVC, &generalGetSetFunc},
{3, "Association type",					1,	ATTR_ACCESS_R_W_SET_CREATE,	    ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,   NO_AVC, &generalGetSetFunc},
{4, "Transmitted traffic",				4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{5, "Received traffic",					4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{6, "Transmitted rate",				    4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{7, "Received rate",					4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{8, "Transmitted Octets",			    4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{9, "Received Octets",					4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{10, "Transmitted discard counter", 	4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{11, "Received discard counter",		4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{12, "Transmitted error counter",		4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{13, "Received error counter",	        4,	ATTR_ACCESS_R,					ATTR_FORMAT_UNSIGNED_INT,	0,		0,		0,	NULL,	NO_AVC, &generalGetFunc},
{255, "", 0, 0,  0, 0, 0, 0, NULL, 0, NULL}
};

/*******************************************************************************************************************************
9.2.x reseved for future standardization 351: for HuaWei OLT IOT. get ethernet port statistic

********************************************************************************************************************************/

omciAttriDescript_t omciAttriDescriptListReserved351PM[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R_SET_CREATE,   ATTR_FORMAT_UNSIGNED_INT,   0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetSetFunc},
{1, "unknown attribute 1" ,     1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{2, "unknown attribute 2",      2 , ATTR_ACCESS_R_W_SET_CREATE, ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3",      1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{4, "unknown attribute 4",      1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{5, "unknown attribute 5",      1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{6, "unknown attribute 6",      1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{7, "unknown attribute 7",      1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{8, "unknown attribute 8",      1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{9, "unknown attribute 9",      1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{10,"unknown attribute 10",     1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{11,"unknown attribute 11",     1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{12, "unknown attribute 12",    1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{13, "unknown attribute 13",    1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{14, "unknown attribute 14",    1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{15, "unknown attribute 15",    1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{16, "unknown attribute 16",    1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};


omciAttriDescript_t omciAttriDescriptListReserved250[] = {
{0, "meId" ,                        2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,         1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,         2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,         2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,         2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,         4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" ,         4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" ,         4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{8, "unknown attribute 8" ,         4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{9, "unknown attribute 9" ,         4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},


{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

omciAttriDescript_t omciAttriDescriptListReserved347[]={
{0, "meId",                         2, ATTR_ACCESS_R,      ATTR_FORMAT_UNSIGNED_INT,    0x1,    0xFFFE, 0,  NULL,  NO_AVC,     &generalGetFunc},
{1, "unknown attribute 1",          1, ATTR_ACCESS_R_W,    ATTR_FORMAT_UNSIGNED_INT,    0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{2, "unknown attribute 2",          6, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,          0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{3, "unknown attribute 3",          25, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{4, "unknown attribute 4",          16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{5, "unknown attribute 5",          16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{6, "unknown attribute 6",          16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{7, "unknown attribute 7",          16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{8, "unknown attribute 8",          16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{9, "unknown attribute 9",          16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{10, "unknown attribute 10",        16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{11, "unknown attribute 11",        16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{12, "unknown attribute 12",        16, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},
{13, "unknown attribute 13",        25, ATTR_ACCESS_R_W,    ATTR_FORMAT_STRING,         0,      0,      0,  NULL,  NO_AVC,     &generalGetSetFunc},

{255, "", 0, 0,  0, 0, 0, 0, NULL, 0, NULL}
};

omciAttriDescript_t omciAttriDescriptListReserved350[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R_SET_CREATE,   ATTR_FORMAT_UNSIGNED_INT,   0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetSetFunc},
{1, "unknown attribute 1" ,     1 , ATTR_ACCESS_R_W,            ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,     1 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{3, "unknown attribute 3" ,     1 , ATTR_ACCESS_R_W,            ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,     1 , ATTR_ACCESS_R_W,            ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,     2 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{6, "unknown attribute 6" ,     4 , ATTR_ACCESS_R_W,            ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" ,     16 ,ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{8, "unknown attribute 8" ,     4 , ATTR_ACCESS_R,              ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetFunc},
{9, "unknown attribute 9" ,     6 , ATTR_ACCESS_R_W,            ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};
omciAttriDescript_t omciAttriDescriptListReserved352[] = {
{0, "meId" ,                  2 , ATTR_ACCESS_R_SET_CREATE,   ATTR_FORMAT_UNSIGNED_INT,   0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetSetFunc},
{1, "unknown attribute 1" ,   2 , ATTR_ACCESS_R_W_SET_CREATE, ATTR_FORMAT_UNSIGNED_INT,   0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,   2 , ATTR_ACCESS_R_W_SET_CREATE, ATTR_FORMAT_UNSIGNED_INT,   1,  255,        0,          NULL,  NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,   2 , ATTR_ACCESS_R_W_SET_CREATE, ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,   1 , ATTR_ACCESS_R_W_SET_CREATE, ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,   4 , ATTR_ACCESS_R_W_SET_CREATE, ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" ,   4 , ATTR_ACCESS_R_W_SET_CREATE, ATTR_FORMAT_UNSIGNED_INT,   0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

omciAttriDescript_t omciAttriDescriptListReserved353[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R_SET_CREATE,   ATTR_FORMAT_UNSIGNED_INT,   0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetSetFunc},
{1, "unknown attribute 1" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" ,    8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{8, "unknown attribute 8" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{9, "unknown attribute 9" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{10, "unknown attribute 10" ,	 8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0, 	   0,		   NULL, NO_AVC, &generalGetSetFunc},
{11, "unknown attribute 11" ,	 8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0, 	   0,		   NULL, NO_AVC, &generalGetSetFunc},
{12, "unknown attribute 12" ,	 2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0, 	   0,		   NULL, NO_AVC, &generalGetSetFunc},
{13, "unknown attribute 13" ,	 2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0, 	   0,		   NULL, NO_AVC, &generalGetSetFunc},
{14, "unknown attribute 14" ,	 2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0, 	   0,		   NULL, NO_AVC, &generalGetSetFunc},
{15, "unknown attribute 15" ,	 2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0, 	   0,		   NULL, NO_AVC, &generalGetSetFunc},
{16, "unknown attribute 16" ,	 2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

omciAttriDescript_t omciAttriDescriptListReserved367[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,     1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,     4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

omciAttriDescript_t omciAttriDescriptListReserved373[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,   NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,     4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,     4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,     4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{8, "unknown attribute 8" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{9, "unknown attribute 9" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{10, "unknown attribute 10" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{11, "unknown attribute 11" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{12, "unknown attribute 12" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{13, "unknown attribute 13" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{14, "unknown attribute 14" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};


omciAttriDescript_t omciAttriDescriptListReserved370[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,   NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,     1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,     4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,   NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

omciAttriDescript_t omciAttriDescriptListReserved65408[] = {
{0, "meId" ,                   2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{3, "mem occupation" ,    		1 , ATTR_ACCESS_R, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{4, "cpu occupation" ,    		1 , ATTR_ACCESS_R, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{5, "temperature" ,    			2 , ATTR_ACCESS_R, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" , 	8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{8, "unknown attribute 8" , 	4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{9, "unknown attribute 9" , 	8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{10, "unknown attribute 10" ,	8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{11, "unknown attribute 11" ,	  8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{12, "unknown attribute 12" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{13, "unknown attribute 13" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{14, "unknown attribute 14" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{15, "unknown attribute 15" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{16, "unknown attribute 16" ,	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

omciAttriDescript_t omciAttriDescriptListReserved65414[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" , 	8 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{8, "unknown attribute 8" , 	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{9, "unknown attribute 9" , 	4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{10, "unknown attribute 10" ,	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},
{11, "unknown attribute 11" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{12, "unknown attribute 12" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{13, "unknown attribute 13" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{14, "unknown attribute 14" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{15, "unknown attribute 15" ,	  2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		  0,		  NULL,   NO_AVC, &generalGetSetFunc},
{16, "unknown attribute 16" ,	2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,			0,			NULL,	NO_AVC, &generalGetSetFunc},


{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

AttributeFunc wanInfoTableFunc = {
	getGeneralTableValue,
	NULL
};

omciAttriDescript_t omciAttriDescriptListReserved65415[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,     1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{2, "wan information" ,     	1 , ATTR_ACCESS_R,	 ATTR_FORMAT_TABLE,  		0,  0,          0,          NULL,  NO_AVC, &wanInfoTableFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};
omciAttriDescript_t omciAttriDescriptListReserved65425[] = {
{0, "meId" ,                    2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL,  NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,     1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,     2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,     4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL,  NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

/*******************************************************************************************************************************
9.2.x reseved for future standardization 247: for ZTE OLT IOT

********************************************************************************************************************************/
omciAttriDescript_t omciAttriDescriptListReserved247[] = {
{0, "meId" ,				   2 , ATTR_ACCESS_R,	ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,		   NULL, NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,    9 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{8, "unknown attribute 8" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{9, "unknown attribute 9" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{10, "unknown attribute 10" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{11, "unknown attribute 11" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{12, "unknown attribute 12" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{13, "unknown attribute 13" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{14, "unknown attribute 14" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{15, "unknown attribute 15" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{16, "unknown attribute 16" ,	1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,	0,	0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};
omciAttriDescript_t omciAttriDescriptListReserved65427[] = {
{0, "meId" ,                   2 , ATTR_ACCESS_R,   ATTR_FORMAT_UNSIGNED_INT,  0,  0x0000FFFF, 0,          NULL, NO_AVC, &generalGetFunc},
{1, "unknown attribute 1" ,    1 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL, NO_AVC, &generalGetSetFunc},
{2, "unknown attribute 2" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL, NO_AVC, &generalGetSetFunc},
{3, "unknown attribute 3" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL, NO_AVC, &generalGetSetFunc},
{4, "unknown attribute 4" ,    2 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL, NO_AVC, &generalGetSetFunc},
{5, "unknown attribute 5" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,          0,          NULL, NO_AVC, &generalGetSetFunc},
{6, "unknown attribute 6" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{7, "unknown attribute 7" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{8, "unknown attribute 8" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},
{9, "unknown attribute 9" ,    4 , ATTR_ACCESS_R_W, ATTR_FORMAT_UNSIGNED_INT,  0,  0,		   0,		   NULL, NO_AVC, &generalGetSetFunc},


{255, "" , 0 , 0,  0, 0,0, 0, NULL , 0, NULL}
};

int omciMeInitForRsvME(omciManageEntity_t *omciManageEntity_p)
{
	omciManageEntity_t *tmpOmciManageEntity_p = NULL;


	if(omciManageEntity_p == NULL)
		return -1;

	tmpOmciManageEntity_p = omciManageEntity_p;
	
    omcidbgPrintf(OMCI_DEBUG_LEVEL_TRACE, "[%s][%d] enter, init classId = %d\n", __FUNCTION__, __LINE__, tmpOmciManageEntity_p->omciMeClassId);
	
	
	/* init some param for this ME */
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_CREAT] = omciCreateAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_DELETE] = omciDeleteAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_GET] = omciGetAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_SET] = omciSetAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_GET_CURR_DATA] = omciGetCurrentDataAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_GET_NEXT] = omciGetNextAction;
	
	return 0;
}

/***************************************************************************************
***********************************ROSTELECOM Vendor***********************************/
#ifdef TCSUPPORT_PON_ROSTELECOM 
//ME353
omciAttriDescript_t omciAttriDescriptListHuaweiConfigUpload[] = {
{0, "meId" ,          2 , ATTR_ACCESS_R,  ATTR_FORMAT_UNSIGNED_INT,	0,	0x0000FFFF, 0,  NULL,  NO_AVC, &generalGetFunc},
{1, "version" ,       14, ATTR_ACCESS_R,  ATTR_FORMAT_STRING, 		0,	0,          0,  NULL,  NO_AVC, &generalGetFunc},
{2, "is committed" ,  1 , ATTR_ACCESS_R,  ATTR_FORMAT_UNSIGNED_INT,	0,	0,          0,  NULL,  NO_AVC, &generalGetFunc},
{3, "is active" ,     1 , ATTR_ACCESS_R,  ATTR_FORMAT_UNSIGNED_INT,	0,	0,          0,  NULL,  NO_AVC, &generalGetFunc},
{4, "is valid" ,      1 , ATTR_ACCESS_R,  ATTR_FORMAT_UNSIGNED_INT,	0,	0,          0,  NULL,  NO_AVC, &generalGetFunc},
{5, "Element1" ,      4 , ATTR_ACCESS_R,  ATTR_FORMAT_UNSIGNED_INT,	0,	0,          0,  NULL,  NO_AVC, &generalGetFunc},
{6, "Element2" ,      4 , ATTR_ACCESS_R,  ATTR_FORMAT_UNSIGNED_INT,	0,	0,          0,  NULL,  NO_AVC, &generalGetFunc},
{7, "ConfigVersion" , 14, ATTR_ACCESS_R,  ATTR_FORMAT_STRING, 		0,	0,          0,  NULL,  NO_AVC, &generalGetFunc},

{255, "" , 0 , 0,  0, 0,0, 0, NULL ,  0 ,NULL}
};

extern int omciHuaweiConfigStartDownloadAction(uint16_t meClassId , omciMeInst_t *meInstant_ptr, omciGenericPayload_t * omciPayLoad, uint8_t msgSrc);
extern int omciHuaweiConfigDownloadSecAction(uint16_t meClassId , omciMeInst_t *meInstant_ptr, omciGenericPayload_t * omciPayLoad, uint8_t msgSrc);
extern int omciHuaweiConfigEndDownloadAction(uint16_t meClassId , omciMeInst_t *meInstant_ptr, omciGenericPayload_t * omciPayLoad, uint8_t msgSrc);
extern int omciHuaweiConfigCommitAction(uint16_t meClassId , omciMeInst_t *meInstant_ptr, omciGenericPayload_t * omciPayLoad, uint8_t msgSrc);

int omciMeInitForHuaweiConfigUpload(omciManageEntity_t *omciManageEntity_p)
{
	omciManageEntity_t *tmpOmciManageEntity_p = NULL;
	
	omcidbgPrintf(OMCI_DEBUG_LEVEL_TRACE, "\r\n enter omciMeInitForHuaweiConfigUpload \r\n");
	omcidbgPrintf(OMCI_DEBUG_LEVEL_NO_MSG, "[%s][%d] [CFGUPLOAD]\n", __FUNCTION__, __LINE__);

	if(omciManageEntity_p == NULL)
		return -1;
	
	tmpOmciManageEntity_p = omciManageEntity_p;
	/* init some param for this ME */
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_GET] = omciGetAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_START_SW_DOWNLOAD] = omciHuaweiConfigStartDownloadAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_DOWNLOAD_SEC] = omciHuaweiConfigDownloadSecAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_END_SW_DOWNLOAD] = omciHuaweiConfigEndDownloadAction;
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_COMMIT_SW] = omciHuaweiConfigCommitAction;
	
	omcidbgPrintf(OMCI_DEBUG_LEVEL_NO_MSG, "[%s][%d] [CFGUPLOAD]\n", __FUNCTION__, __LINE__);
	return 0;
}

int initHuaweiCfgUploadStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
	omci_me_info_t me_info_buf={0};
	omci_huawei_cfg_upload_ptr huawei_cfg_upload_ptr=NULL;
	omci_software_image_ptr software_image_ptr=NULL;

	omcidbgPrintf(OMCI_DEBUG_LEVEL_NO_MSG, "[%s][%d] [CFGUPLOAD] instId=%d\n", __FUNCTION__, __LINE__,instId);

    if(data == NULL)
        return -1;
	
    huawei_cfg_upload_ptr = (omci_huawei_cfg_upload_ptr)data;
	huawei_cfg_upload_ptr->meId = htons(instId);
	
	me_info_buf.class_id = OMCI_CLASS_ID_SOFTWARE_IMGAE;
	me_info_buf.inst_id = instId;
	if(omci_attr_get_all_data_except_table_attr(&me_info_buf) != 0){
		omcidbgPrintf(OMCI_DEBUG_LEVEL_ERROR, "[%s][%d] get attribute data fail\n",__FUNCTION__,__LINE__);
		return -1;
	}
	software_image_ptr = (omci_software_image_ptr)(me_info_buf.attributes);
	
	huawei_cfg_upload_ptr->isActive = software_image_ptr->isActive;
	huawei_cfg_upload_ptr->isCommited = software_image_ptr->isCommited;
	huawei_cfg_upload_ptr->isValid= software_image_ptr->isValid;
	memcpy(huawei_cfg_upload_ptr->version,software_image_ptr->version,sizeof(software_image_ptr->version));

	omcidbgPrintf(OMCI_DEBUG_LEVEL_NO_MSG, "[%s][%d] [CFGUPLOAD] %d %d %d ver=%s\n",__FUNCTION__, __LINE__,
		huawei_cfg_upload_ptr->isActive,huawei_cfg_upload_ptr->isCommited,huawei_cfg_upload_ptr->isValid,huawei_cfg_upload_ptr->version);

    return 0;
}

#endif
/***************************************************************************************
***********************************CUC Vendor***********************************************/
int omciMeInitForCucOnuCapability(omciManageEntity_t *omciManageEntity_p)
{
    omciManageEntity_ptr tmpOmciManageEntity_p =omciManageEntity_p;
    
    if(omciManageEntity_p == NULL)
            return -1;

    omcidbgPrintf(OMCI_DEBUG_LEVEL_TRACE, "[%s][%d] enter, init classId = %d\n", __FUNCTION__, __LINE__, tmpOmciManageEntity_p->omciMeClassId);
    tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_GET] = omciGetAction;
    
    return 0;       
}


omciAttriDescript_t omciAttriDescriptListCucOnuCapability[]={
{0, "meId",                 			2,  ATTR_ACCESS_R,      ATTR_FORMAT_UNSIGNED_INT,   0x1,    0xFFFE, 0,  NULL,  NO_AVC,     &generalGetFunc},
{1, "Operator ID",          			4,  ATTR_ACCESS_R,      ATTR_FORMAT_STRING,         0,  	0,      0,  NULL,  NO_AVC,     &generalGetFunc},
{2, "CUC Spec Version",     			1,  ATTR_ACCESS_R,      ATTR_FORMAT_ENUM,           0,  	1,      0,  NULL,  NO_AVC,     &generalGetFunc},
{3, "ONU Type",             			1,  ATTR_ACCESS_R,      ATTR_FORMAT_ENUM,           0,  	5,      0,  NULL,  NO_AVC,     &generalGetFunc},
{4, "ONU Tx power supply control",      1,  ATTR_ACCESS_R,  ATTR_FORMAT_ENUM,   			0,  	2,      0,  NULL,  NO_AVC,     &generalGetFunc},
{255, "", 0, 0,  0, 0, 0, 0, NULL, 0, NULL}
};


int omciMeInitForCucOnuTransInfo(omciManageEntity_t *omciManageEntity_p){
	omciManageEntity_ptr tmpOmciManageEntity_p =omciManageEntity_p;

	if(omciManageEntity_p == NULL)
		return -1;

    omcidbgPrintf(OMCI_DEBUG_LEVEL_TRACE, "[%s][%d] enter, init classId = %d\n", __FUNCTION__, __LINE__, tmpOmciManageEntity_p->omciMeClassId);
	tmpOmciManageEntity_p->omciActionFunc[MT_OMCI_MSG_TYPE_GET] = omciGetAction;
	
	return 0;		
}

omciAttriDescript_t omciAttriDescriptListCucOnuTransInfo[]={
{0, "meId",				    2,	ATTR_ACCESS_R,		ATTR_FORMAT_UNSIGNED_INT,	0x1,	0xFFFE,	    0,	NULL,	NO_AVC,		&generalGetFunc},
{1, "Module type",			1,	ATTR_ACCESS_R,	    ATTR_FORMAT_ENUM,			0,	    0xFF,		0,	NULL,	NO_AVC,		&generalGetFunc},
{2, "Module sub-type", 	    1,	ATTR_ACCESS_R,		ATTR_FORMAT_ENUM,			0,	    0xFF,		0,	NULL,	NO_AVC, 	&generalGetFunc},
{3, "Used type",		    1,	ATTR_ACCESS_R,	    ATTR_FORMAT_ENUM,		    0,	    0xFF,		0,	NULL,	NO_AVC,		&generalGetFunc},
{4, "Encapsulation Type",	1,	ATTR_ACCESS_R,	    ATTR_FORMAT_ENUM,           0,	    0xFF,		0,	NULL,	NO_AVC,		&generalGetFunc},
{5, "Tx wavelength",	    2,	ATTR_ACCESS_R,	    ATTR_FORMAT_UNSIGNED_INT,   0,	    0xFFFF,		0,	NULL,	NO_AVC,		&generalGetFunc},
{6, "Rx wavelength",	    2,	ATTR_ACCESS_R,	    ATTR_FORMAT_UNSIGNED_INT,   0,	    0xFFFF,		0,	NULL,	NO_AVC,		&generalGetFunc},
{7, "Vendor name",	        16,	ATTR_ACCESS_R,	    ATTR_FORMAT_STRING,         0,	    0,		    0,	NULL,	NO_AVC,		&generalGetFunc},
{8, "Vendor PN",	        16,	ATTR_ACCESS_R,	    ATTR_FORMAT_STRING,         0,	    0,		    0,	NULL,	NO_AVC,		&generalGetFunc},
{9, "Vendor SN",	        16,	ATTR_ACCESS_R,	    ATTR_FORMAT_STRING,         0,	    0,		    0,	NULL,	NO_AVC,		&generalGetFunc},

{255, "", 0, 0,  0, 0, 0, 0, NULL, 0, NULL}
};

/**************************************************************************************************
*************                                                  Vendor Table INIT                                ****************
*************************************************************************************************/

omciManageEntity_t omciVendorMeTbl[] =
{
/*
omciMeIndex, omciMeClassId, omciMeName[32], omciMeInitFunc, omciMeInitFunc, omciActionFunc, omciInternalCreateFunc, omciMeAttriNum, omciAttriDescriptList,needAlarm;omciInst;	
*/
#ifdef TCSUPPORT_OMCI_CTC
{OMCI_CLASS_ID_CTC_ONU_LOOP_DETECTION,		"ONU Loop Detection",	OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,omciMeInitForOnuLoopDetection, 			{NULL},	omciAttriDescriptListOnuLoopDetection, 			{PTHREAD_MUTEX_INITIALIZER , NULL}, alarmIdLoopDetection , NORMAL },
{OMCI_CLASS_ID_CTC_ONU_CAPABILITY,		"ONU capability",	OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,		omciMeInitForOnuCapability, 			{NULL},	omciAttriDescriptListOnuCapability, 			{PTHREAD_MUTEX_INITIALIZER , NULL}, NULL , NORMAL },
{OMCI_CLASS_ID_CTC_LOID_AUTHEN,		"LOID authentication",	OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,		omciMeInitForLoidAuthen, 			{NULL},	omciAttriDescriptListLoidAuthentication, 			{PTHREAD_MUTEX_INITIALIZER , NULL}, NULL , UNNEED_MIB_UPLOAD },
{OMCI_CLASS_ID_CTC_EXTENDED_MUTICAST_PROFILE,				"Extended multicast profiles",	OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,		omciMeInitForExtendMulticastProfile, 			{NULL},	omciAttriDescriptListExtMulticastProfile, 			{PTHREAD_MUTEX_INITIALIZER , NULL}, NULL , NORMAL },
#endif
#ifdef TCSUPPORT_CUC
{OMCI_CLASS_ID_CUC_ONU_CAPABILITY,		"ONU Capability",			OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForCucOnuCapability,		{NULL}, omciAttriDescriptListCucOnuCapability,		{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_ONU_OPTICAL_TRANS_INFO,	"ONU optical transceivers information", OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT, omciMeInitForCucOnuTransInfo,	{NULL}, omciAttriDescriptListCucOnuTransInfo,	{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
#endif

#ifdef TCSUPPORT_OMCI_ALCATEL
{OMCI_CLASS_ID_VOIP_CALL_STATISTICS,	"VoIP Call statistics", OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMEInitForVoIPCallStatistics,  {NULL}, omciAttriDescriptListVoIPCallStatistics,	{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,	 NORMAL},
{OMCI_CLASS_ID_CLOCK_DATA_SET,          "Clock Data Set",       OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,    omciMEInitForClockDataSet,        {NULL}, omciAttriDescriptListClockDataSet,        {PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,   NORMAL},
{OMCI_CLASS_ID_PTP_MASTER_CONFIG_DATA_PROFILE,"PTP Master Configure Data Profile",  OMCI_ME_ACCESS_OLT,OMCI_ME_SUPPORT, omciMEInitForPTPMasterConfigDataProfile,{NULL}, omciAttriDescriptListPTPMasterConfigDataProfile,{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,   NORMAL},
{OMCI_CLASS_ID_PTP_Port,                "PTP Port",  OMCI_ME_ACCESS_OLT,OMCI_ME_SUPPORT, omciMEInitForPTPPort,{NULL}, omciAttriDescriptListPTPPort,{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,   NORMAL},
{OMCI_CLASS_ID_TOTAL_GEM_PORT_PM,	"Total GEM port PM",	OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForTotalGemPortPM, 	{NULL},	omciAttriDescriptListTotalGemPortPm, 	{PTHREAD_MUTEX_INITIALIZER , NULL}, NULL , IS_CLASSICAL_PM_ME},
{OMCI_CLASS_ID_ETHERNET_TRAFFIC_PM,	"Ethernet Traffic PM",	OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForEthernetTrafficPM,	{NULL}, omciAttriDescriptListEthernetTrafficPm,	{PTHREAD_MUTEX_INITIALIZER , NULL}, NULL , IS_CLASSICAL_PM_ME},
{OMCI_CLASS_ID_VLAN_TAG_DOWNSTREAM_EGRESS_BEHAVIOR_SUPPLEMENTAL1, "Vlan Tag Downstream Egress Behavior Supplemental 1",	OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForVlanTagDownstreamSupplemental1, {NULL}, omciAttriDescriptListVlanTagDownstreamSupplemental1, {PTHREAD_MUTEX_INITIALIZER , NULL}, NULL , NORMAL},
#if defined (TCSUPPORT_UPSTREAM_VLAN_POLICER)
{OMCI_CLASS_ID_VLAN_TAG_UPSTREAM_POLICER, "Vlan Tag Upstream Policer",	OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForVlanTagUpstreamPolicer, {NULL}, omciAttriDescriptListVlanTagUpstreamPolicer, {PTHREAD_MUTEX_INITIALIZER , NULL}, NULL , NORMAL},
#endif
{OMCI_CLASS_ID_ONT_OPTICAL_SUPERVISION_STATUS, 	"ONT Optical Supervision Status",		OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForONTOpticalSupervisionStatus,	{NULL}, omciAttriDescriptListONTOpticalSupervisionStatus,	{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL, NORMAL },
{OMCI_CLASS_ID_UNI_SUPPLEMENTAL_1_V2,	"UNI Supplemental 1 V2",		OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForUNISupplemental1V2,	{NULL}, omciAttriDescriptListUNISupplemental1V2,	{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL, NORMAL },
{OMCI_CLASS_ID_ONT_GENERIC_V2,	"ONT Generic V2",		OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForONTGenericV2,	{NULL}, omciAttriDescriptListONTGenericV2,	{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL, NORMAL },
{OMCI_CLASS_ID_GEMPORT_PROTOCOL_MONITORING_HISTORY_DATA_PART_2,		"GEMPort Protocol Monitoring History Data - Part 2",			OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForGEMPortProtocolMonitoringHistoryDataPart2,		{NULL}, omciAttriDescriptListGEMPortProtocolMonitoringHistoryDataPart2,		{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,IS_CLASSICAL_PM_ME},
#endif

{OMCI_CLASS_ID_RESERVED_247_ME, 			    "reserved 247 ME",					OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 			{NULL}, omciAttriDescriptListReserved247,			{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,UNNEED_MIB_UPLOAD},
#ifdef TCSUPPORT_VNPTT
{OMCI_CLASS_ID_RESERVED_250_ME, 				"reserved 250 ME",					OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved250,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_RESERVED_347_ME, 				"reserved 347 ME",					OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved347,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
#else
{OMCI_CLASS_ID_RESERVED_250_ME, 				"PPPoE Wan config info",            OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForPPPoECfg, 				{NULL}, omciAttriDescriptListPPPoECfg,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
#endif
{OMCI_CLASS_ID_ETHERNET_PM_HISTORY_DATA_4,		"Ethernet PM history data 4",		OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForRsvME,		        {NULL}, omciAttriDescriptListEthernetPMHistoryData4,		{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,IS_CLASSICAL_PM_ME },
{OMCI_CLASS_ID_RESERVED_351_PM, 				"reserved 351 PM",					OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForRsvME,				{NULL}, omciAttriDescriptListReserved351PM, 			{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,IS_CLASSICAL_PM_ME},

#ifdef TCSUPPORT_PON_ROSTELECOM
{OMCI_CLASS_ID_HUAWEI_CONFIG_UPLOAD,			"Huawei config upload", 			OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForHuaweiConfigUpload,	{NULL}, omciAttriDescriptListHuaweiConfigUpload,		{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
#endif

#ifdef TCSUPPORT_HUAWEI_OLT_VENDOR_SPECIFIC_ME
{OMCI_CLASS_ID_RESERVED_350_ME, 				"reserved 350 ME",					OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME,					{NULL}, omciAttriDescriptListReserved350, 				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_RESERVED_352_ME, 				"reserved 352 ME",					OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved352,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,UNNEED_MIB_UPLOAD},
#ifndef TCSUPPORT_PON_ROSTELECOM
{OMCI_CLASS_ID_RESERVED_353_ME, 				"reserved 353 ME",					OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved353,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
#endif
{OMCI_CLASS_ID_RESERVED_367_ME, 				"reserved 367 ME",					OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved367,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_RESERVED_373_ME, 				"reserved 373 ME",					OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved373,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
#ifdef TCSUPPORT_HUAWEI_OLT_VENDOR_SPECIFIC_ME_FOR_INA
{OMCI_CLASS_ID_RESERVED_370_ME, 				"reserved 370 ME",					OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved370,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_RESERVED_65408_ME, 				"reserved 65408 ME",				OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved65408,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_RESERVED_65414_ME, 				"reserved 65414 ME",				OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved65414,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_RESERVED_65415_ME,				"reserved 65415 ME",				OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved65415, 			{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
{OMCI_CLASS_ID_RESERVED_65425_ME, 				"reserved 65425 ME",				OMCI_ME_ACCESS_ONU, OMCI_ME_SUPPORT,	omciMeInitForRsvME, 				{NULL}, omciAttriDescriptListReserved65425,				{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,NORMAL},
#endif
#endif
{OMCI_CLASS_ID_RESERVED_65427_ME,				"reserved 65427 ME",				OMCI_ME_ACCESS_OLT, OMCI_ME_SUPPORT,	omciMeInitForRsvME,				{NULL}, omciAttriDescriptListReserved65427, 			{PTHREAD_MUTEX_INITIALIZER , NULL},  NULL,UNNEED_MIB_UPLOAD},
};


int initCTCLoopDetectionStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
	if(data == NULL)
        return -1;
    omci_ctc_loop_detect_ptr tmp = (omci_ctc_loop_detect_ptr)data;
	memset(tmp, 0, sizeof(omci_ctc_loop_detect_t));
	tmp->meId = htons(instId);

	omci_lib_get_operator_id_auth(tmp->operatorId, sizeof(tmp->operatorId));
	tmp->LoopDectMagt = htons(0x0001);
	tmp->LoopPortDown = htons(0x0001);


	return 0;
}

int initCTCOnuCapStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;
    omci_ctc_onu_cap_ptr tmp = (omci_ctc_onu_cap_ptr)data;

    memset(tmp, 0, sizeof(omci_ctc_onu_cap_t));

    tmp->meId = htons(instId);
    omci_lib_get_operator_id_cap(tmp->operatorId, sizeof(tmp->operatorId));
    omci_lib_get_spec_version(& tmp->ctcSpecVersion);
    tmp->onuType = pSystemCap->onuType - 1;
    omci_lib_get_onu_power_ctrl(& tmp->onuTxPowerCtrl);

    return 0;
}

int initCTCLoidAuthStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_ctc_loid_auth_ptr tmp = (omci_ctc_loid_auth_ptr)data;

    memset(tmp, 0, sizeof(omci_ctc_loid_auth_t));

    tmp->meId = htons(instId);

    omci_lib_get_operator_id_auth(tmp->operatorId, sizeof(tmp->operatorId));
    omci_lib_get_loid(tmp->loid, sizeof(tmp->loid));
    omci_lib_get_loid_password(tmp->password, sizeof(tmp->password));
    return omci_lib_get_auth_status(&tmp->authStatus);
}

int initCUCOnuCapStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_cuc_onu_cap_ptr tmp = (omci_cuc_onu_cap_ptr)data;

    memset(tmp, 0, sizeof(omci_cuc_onu_cap_t));

    tmp->meId = htons(instId);
    strcpy(tmp->operatorId, "CUC");
    omci_lib_get_spec_version(& tmp->specVer);
    tmp->onuType = pSystemCap->onuType - 1;
    omci_lib_get_onu_power_ctrl(& tmp->txPwrSupCtrl);

    return 0;
}

int initCUCOnuTransInfoStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_cuc_onu_trans_info_ptr tmp = (omci_cuc_onu_trans_info_ptr)data;
	PHY_PARAMS_t pPhyTransParams;

    memset(tmp, 0, sizeof(omci_cuc_onu_trans_info_t));
	memset(&pPhyTransParams,0,sizeof(PHY_PARAMS_t));

    tmp->meId = htons(instId);
	
	gponmgr_lib_get_phy_trans_params(&pPhyTransParams);
	if(pOnuCap->linkMode == OMCI_LINK_MODE_XGPON){
    	tmp->moduleType = 1;   /* set module type 0x00:G-PON    0x01:XG-PON   0x02:XGS-PON */
		tmp->rxWaveLen =  htons(0x0629);
	}else if(pOnuCap->linkMode == OMCI_LINK_MODE_XGSPON  || pOnuCap->linkMode == OMCI_LINK_MODE_NGPON2_10G_10G){
		tmp->moduleType = 2;
		tmp->rxWaveLen =  htons(0x0629);
	}else{
		tmp->moduleType = 0;
		tmp->rxWaveLen =  htons(0x05d2);
	}
    tmp->moduleSubType = 0;/* 0x00: Class B+/C+  0x01:N1/N2a/E1/E2a   0x02:N2b/E2b 0x03:N1/N2/E1 */
	tmp->usedType  =  0;   /* 0x00:ONU ,0x01~0xff:reserved*/		
	tmp->encapType = 0;    /*0x00:SFP,0x01:XFP*/
	tmp->txWaveLen = pPhyTransParams.transInfo.txWaveLen;
	memcpy(tmp->vendorName, pPhyTransParams.transInfo.vendorName,TRANS_VENDOR_NAME_SIZE);
	memcpy(tmp->vendorPN, pPhyTransParams.transInfo.vendorPN,TRANS_VENDOR_PN_SIZE);
	memcpy(tmp->vendorSN, pPhyTransParams.transInfo.vendorSN,TRANS_VENDOR_SN_SIZE);
    return 0;
}

int initOntOpticalStatusStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_alcatel_ont_optical_status_ptr tmp = (omci_alcatel_ont_optical_status_ptr)data;

    memset(tmp, 0, sizeof(omci_alcatel_ont_optical_status_t));

    tmp->meId = htons(instId);
    tmp->powerFeedVolMI = 1;
    tmp->rcvOpticalPowerMI = 1;
    tmp->transOpticalPowerMI = 1;
    tmp->laserBiasCurrentMI = 1;
    tmp->temperatureMI = 1;

    return 0;
}

int initOntGenericV2Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_alcatel_ont_generic_v2_ptr tmp = (omci_alcatel_ont_generic_v2_ptr)data;

    memset(tmp, 0, sizeof(omci_alcatel_ont_generic_v2_t));

    tmp->meId = htons(instId);
    tmp->igmpSnoopEnable = 1;
    tmp->aluProMeCapBitMap = htonl(0x390c0);
    tmp->aluSpecBehaveField = htonl(1);

    return 0;
}

int initVlanTagDownStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    uint16_t instanceId = 0;
    if(data == NULL)
        return -1;

    omci_alcatel_vlan_tag_down_supply1_ptr tmp = (omci_alcatel_vlan_tag_down_supply1_ptr)data;

    memset(tmp, 0, sizeof(omci_alcatel_vlan_tag_down_supply1_t));

    if(IS_SPECIAL_SLOT)
        instanceId = instId & 0xFF;
    else
        instanceId = instId;
    tmp->meId = htons(instanceId);
    tmp->vlanTxDefaultTag = 0x2;

    return 0;
}

int initUniSupplyStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    uint16_t instanceId = 0;
    if(data == NULL)
        return -1;

    omci_alcatel_uni_supply_1v2_ptr tmp = (omci_alcatel_uni_supply_1v2_ptr)data;

    memset(tmp, 0, sizeof(omci_alcatel_uni_supply_1v2_t));

    if(IS_SPECIAL_SLOT)
        instanceId = instId & 0xFF;
    else
        instanceId = instId;
    tmp->meId = htons(instanceId);
    tmp->downTagHandleMode = 2;
    tmp->multicastVIDValue = htons(4096);
    tmp->multicastPbitValue = 8;
    tmp->maxNumOfHostPerUni = 8;

    return 0;
}

int initVlanTagUpStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_alcatel_vlan_tag_up_policy_ptr tmp = (omci_alcatel_vlan_tag_up_policy_ptr)data;

    memset(tmp, 0, sizeof(omci_alcatel_vlan_tag_up_policy_t));

    tmp->meId = htons(instId);

    return 0;
}

int initMe247Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
	uint8_t value3[9] = {0x46,0x36,0x31,0x32,0x57,0x56,0x36,0x2e,0x30};
	if(data == NULL)
        return -1;
    omci_reserved_me_247_ptr tmp = (omci_reserved_me_247_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_247_t));

    tmp->meId = htons(instId);

	memcpy(tmp->value3, value3, sizeof(tmp->value3));

    return 0;
}

int initMe347Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    uint8_t value2[6] = {0xa0,0x65,0x18,0x13,0xea,0x1b};
    uint16_t instanceId = 0;
    if(data == NULL)
        return -1;
    omci_reserved_me_347_ptr tmp = (omci_reserved_me_347_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_347_t));

    if(IS_SPECIAL_SLOT)
        instanceId = instId & 0xFF;
    else
        instanceId = instId;
    tmp->meId = htons(instanceId);
    memcpy(tmp->value2, value2, sizeof(tmp->value2));
    return 0;
}

int initMe350Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;
    omci_reserved_me_350_ptr tmp = (omci_reserved_me_350_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_350_t));

    tmp->meId = htons(instId);

    return 0;
}

int initMe352Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;
    omci_reserved_me_352_ptr tmp = (omci_reserved_me_352_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_352_t));

    tmp->meId = htons(instId);

    return 0;
}

int initMe353Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
	uint8_t value6[4] = {0x01,0x01,0x01,0x00};
	uint8_t value7[8] = {0x31,0x2e,0x33,0x2e,0x30,0x2e,0x30,0x00};
    if(data == NULL)
        return -1;
    omci_reserved_me_353_ptr tmp = (omci_reserved_me_353_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_353_t));

    tmp->meId = htons(instId);
	memcpy(tmp->value6, value6, sizeof(tmp->value6));
	memcpy(tmp->value7, value7, sizeof(tmp->value7));

    return 0;
}

int initMe367Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;
    omci_reserved_me_367_ptr tmp = (omci_reserved_me_367_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_367_t));

    tmp->meId = htons(instId);

    return 0;
}

int initMe373Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
	uint8_t  value1[2] = {0x01,0x01};
	uint8_t  value3[4] = {0x01,0x01,0x01,0x01};
	uint8_t  value4[4] = {0xff,0x80,0x80,0x0};
	uint8_t  value5[4] = {0xe0,0x0,0xc0,0x0};
	uint8_t  value6[2] = {0x01,0x0};
    if(data == NULL)
        return -1;
    omci_reserved_me_373_ptr tmp = (omci_reserved_me_373_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_373_t));

    tmp->meId = htons(instId);
	memcpy(tmp->value1, value1, sizeof(tmp->value1));
	memcpy(tmp->value3, value3, sizeof(tmp->value3));
	memcpy(tmp->value4, value4, sizeof(tmp->value4));
	memcpy(tmp->value5, value5, sizeof(tmp->value5));
	memcpy(tmp->value6, value6, sizeof(tmp->value6));

    return 0;
}

int initMe370Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;
    omci_reserved_me_370_ptr tmp = (omci_reserved_me_370_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_370_t));

    tmp->meId = htons(instId);

    return 0;
}

int initMe65408Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
	uint8_t  value2[2] = {0x01,0x0};
	uint8_t  value6[2] = {0x31,0x34};
	uint8_t  value7[8] = {0x31,0x37};
	uint8_t  value8[4] = {0x0,0x54,0x52,0x55};
	uint8_t  value9[8] = {0x45};
	uint8_t  value10[8] = {0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a};
	uint8_t  value11[8] = {0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a};
	uint8_t  value16[2] = {0x13,0x0};
    if(data == NULL)
        return -1;

    omci_reserved_me_65408_ptr tmp = (omci_reserved_me_65408_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_65408_t));

    tmp->meId = htons(instId);

	memcpy(tmp->value2, value2, sizeof(tmp->value2));
	memcpy(tmp->value6, value6, sizeof(tmp->value6));
	memcpy(tmp->value7, value7, sizeof(tmp->value7));
	memcpy(tmp->value8, value8, sizeof(tmp->value8));
	memcpy(tmp->value9, value9, sizeof(tmp->value9));
	memcpy(tmp->value10, value10, sizeof(tmp->value10));
	memcpy(tmp->value11, value11, sizeof(tmp->value11));
	memcpy(tmp->value16, value16, sizeof(tmp->value16));

    return 0;
}

int initMe65414Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
	uint8_t  value1[2] = {0x3a,0x0};
	uint8_t  value2[2] = {0x03,0x8b};
	uint8_t  value3[8] = {0x42,0xff,0xff,0x2d,0x42,0x4f,0x42,0x2d};;
	uint8_t  value4[2] = {0x30,0x30};
	uint8_t  value5[2] = {0x30,0x32};
	uint8_t  value6[2] = {0x0,0x6f};
	uint8_t  value7[2] = {0x6d,0x63};
	uint8_t  value8[2] = {0x69,0x0};
    if(data == NULL)
        return -1;

    omci_reserved_me_65414_ptr tmp = (omci_reserved_me_65414_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_65414_t));

    tmp->meId = htons(instId);

	memcpy(tmp->value1, value1, sizeof(tmp->value1));
	memcpy(tmp->value2, value2, sizeof(tmp->value2));
	memcpy(tmp->value3, value3, sizeof(tmp->value3));
	memcpy(tmp->value4, value4, sizeof(tmp->value4));
	memcpy(tmp->value5, value5, sizeof(tmp->value5));
	memcpy(tmp->value6, value6, sizeof(tmp->value6));
	memcpy(tmp->value7, value7, sizeof(tmp->value7));
	memcpy(tmp->value8, value8, sizeof(tmp->value8));

    return 0;
}

int initMe65415Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_reserved_me_65415_ptr tmp = (omci_reserved_me_65415_ptr)data;
    
    memset(tmp, 0 , sizeof(omci_reserved_me_65415_t));

    tmp->meId = htons(instId);
    tmp->value1 = 0x02;

    return 0;
}

int initMe65425Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_reserved_me_65425_ptr tmp = (omci_reserved_me_65425_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_65425_t));
    tmp->meId = htons(instId);

    return 0;
}

int initMe65427Struct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_reserved_me_65427_ptr tmp = (omci_reserved_me_65427_ptr)data;

    memset(tmp, 0 , sizeof(omci_reserved_me_65427_t));

    tmp->meId = htons(instId);

    return 0;
}

int initTrafficDescriptorStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    if(data == NULL)
        return -1;

    omci_traffic_descriptor_ptr tmp = (omci_traffic_descriptor_ptr)data;

    memset(tmp, 0 , sizeof(omci_traffic_descriptor_t));

    tmp->meId = htons(instId);
    
    return 0;
}

int initEltexOnuGStruct(uint16_t classId, uint16_t instId, uint8_t *data)
{
    //OMCI_FUNC_TRACE_ENTER;

    if(data == NULL)
    {
        return -1;
    }
    omci_onu_g_ptr tmp = (omci_onu_g_ptr)data;
    memset(tmp, 0, sizeof(omci_onu_g_t));

    tmp->meId = htons(instId);
    memcpy(tmp->vendorId, pOnuCap->sn, sizeof(tmp->vendorId));
    memcpy(tmp->version, pOnuCap->version, sizeof(tmp->version));
    memcpy(tmp->serialNumber, pOnuCap->sn, sizeof(tmp->serialNumber));
    tmp->trafficMgrOp = pOnuCap->tmOption;
    tmp->deprecated = 0;
    tmp->batteryBackup = 0;
    tmp->onuSurvivalTime = pOnuCap->onuSurvivalTime;
    tmp->extendedTCLayerOp = htons(pOnuCap->extendedTcLayer);
    //OMCI_FUNC_TRACE_LEAVE;
    return 0;
}

vendorMeInitTableBuff_t initVendorData;


omciOnuCreateME_t onuInitInst_VendorMeTbl[] = 
{
#ifdef TCSUPPORT_OMCI_CTC
	{OMCI_CLASS_ID_CTC_ONU_LOOP_DETECTION,          0,                                (uint8_t *)&initVendorData.ctcLoopDetection,          initCTCLoopDetectionStruct},  /*CTC*/
	{OMCI_CLASS_ID_CTC_ONU_CAPABILITY,              0,                                (uint8_t *)&initVendorData.ctcOnuCap,          initCTCOnuCapStruct},  /*CTC*/
    {OMCI_CLASS_ID_CTC_LOID_AUTHEN,                 0,                                (uint8_t *)&initVendorData.ctcLoidAuth,        initCTCLoidAuthStruct},  /*CTC*/
#endif
#ifdef TCSUPPORT_CUC
    {OMCI_CLASS_ID_CUC_ONU_CAPABILITY,              0,                                (uint8_t *)&initVendorData.cucOnuCap,          initCUCOnuCapStruct}, /*CUC*/
    {OMCI_CLASS_ID_ONU_OPTICAL_TRANS_INFO,			0,								(uint8_t *)&initVendorData.cucOnuTransInfo, 	 initCUCOnuTransInfoStruct}, /*CUC*/
#endif
#ifdef TCSUPPORT_OMCI_ALCATEL
    {OMCI_CLASS_ID_ONT_OPTICAL_SUPERVISION_STATUS,  ANI_G_INST_START_ID,             (uint8_t *)&initVendorData.ontOpticalStatus,   initOntOpticalStatusStruct},
    {OMCI_CLASS_ID_ONT_GENERIC_V2,                  0,                                (uint8_t *)&initVendorData.ontGenericV2,       initOntGenericV2Struct},
    {OMCI_CLASS_ID_VLAN_TAG_DOWNSTREAM_EGRESS_BEHAVIOR_SUPPLEMENTAL1,   UNI_INST_START_ID, (uint8_t *)&initVendorData.vlanTagDown,   initVlanTagDownStruct},
    {OMCI_CLASS_ID_UNI_SUPPLEMENTAL_1_V2,           UNI_INST_START_ID,                 (uint8_t *)&initVendorData.uniSupply1v2,      initUniSupplyStruct},
#ifdef TCSUPPORT_UPSTREAM_VLAN_POLICER
    {OMCI_CLASS_ID_VLAN_TAG_UPSTREAM_POLICER,       UNI_INST_START_ID,                  (uint8_t *)&initVendorData.vlanTagUp,        initVlanTagUpStruct},
#endif
#endif
	{OMCI_CLASS_ID_RESERVED_247_ME, 				0,								  (uint8_t *)&initVendorData.me247, 			 initMe247Struct},
#ifdef TCSUPPORT_VNPTT
    {OMCI_CLASS_ID_RESERVED_347_ME,                 2,                                (uint8_t *)&initVendorData.me347,              initMe347Struct},
#endif
#ifdef TCSUPPORT_PON_ROSTELECOM 
	{OMCI_CLASS_ID_HUAWEI_CONFIG_UPLOAD, 			0,								  (uint8_t *)&initVendorData.huaweiCfgUpload,    initHuaweiCfgUploadStruct},
	{OMCI_CLASS_ID_HUAWEI_CONFIG_UPLOAD, 			1,								  (uint8_t *)&initVendorData.huaweiCfgUpload,    initHuaweiCfgUploadStruct},
	{OMCI_CLASS_ID_ONU_G,							0xFF01, 						  (uint8_t *)&initVendorData.eltexOnuG,	 		 initEltexOnuGStruct},
#endif
#ifdef TCSUPPORT_HUAWEI_OLT_VENDOR_SPECIFIC_ME
    {OMCI_CLASS_ID_RESERVED_350_ME,                 0,                                (uint8_t *)&initVendorData.me350,              initMe350Struct},
    {OMCI_CLASS_ID_RESERVED_352_ME,                 0,                                (uint8_t *)&initVendorData.me352,              initMe352Struct},
#ifndef TCSUPPORT_PON_ROSTELECOM 
    {OMCI_CLASS_ID_RESERVED_353_ME,                 0,                                (uint8_t *)&initVendorData.me353,              initMe353Struct},
#endif
    {OMCI_CLASS_ID_RESERVED_367_ME,                 0,                                (uint8_t *)&initVendorData.me367,              initMe367Struct},
    {OMCI_CLASS_ID_RESERVED_373_ME,                 0,                                (uint8_t *)&initVendorData.me373,              initMe373Struct},
#ifdef TCSUPPORT_HUAWEI_OLT_VENDOR_SPECIFIC_ME_FOR_INA
    {OMCI_CLASS_ID_RESERVED_370_ME,                 0x101,                            (uint8_t *)&initVendorData.me370,              initMe370Struct},
    {OMCI_CLASS_ID_RESERVED_65408_ME,               0,                                (uint8_t *)&initVendorData.me65408,            initMe65408Struct},
    {OMCI_CLASS_ID_RESERVED_65414_ME,               0,                                (uint8_t *)&initVendorData.me65414,            initMe65414Struct},
    {OMCI_CLASS_ID_RESERVED_65415_ME,               0,                                (uint8_t *)&initVendorData.me65415,            initMe65415Struct},
    {OMCI_CLASS_ID_RESERVED_65425_ME,               0,                                (uint8_t *)&initVendorData.me65425,            initMe65425Struct},
#endif
#endif
	{OMCI_CLASS_ID_RESERVED_65427_ME,				0xFF80,								  (uint8_t *)&initVendorData.me65427,			 initMe65427Struct},
#ifdef TCSUPPORT_CHS
    {OMCI_CLASS_ID_TRAFFIC_DESCRIPTOR,              0xFFFF,                           (uint8_t *)&initVendorData.trafficDes,         initTrafficDescriptorStruct}
#endif
};
int omciAddVendorMeToStdMeTable(void)
{
    omciVendorMeTable = omciVendorMeTbl;
    onuInitInst_VendorMeTable = onuInitInst_VendorMeTbl;
    
    omci.vendorMeTblSize = sizeof(omciVendorMeTbl)/sizeof(omciManageEntity_t);
    vendorInitMeTableSize = sizeof(onuInitInst_VendorMeTbl)/sizeof(omciOnuCreateME_t);
    return 0;
}
